package com.xhsj.user.hr.process.tbLearningGarden.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import com.xhsj.user.hr.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 学习园地内容申请表
 * </p>
 *
 * @author liuqinghua
 * @since 2020-11-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_learning_garden_content_apply")
public class TbLearningGardenContentApply extends BaseEntity<TbLearningGardenContentApply> {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @TableField("title")
    private String title;

    /**
     * 摘要
     */
    @TableField("digest")
    private String digest;

    /**
     * 内容
     */
    @TableField("content")
    private String content;

    /**
     * 发布部门id
     */
    @TableField("publishing_department_id")
    private Integer publishingDepartmentId;

    /**
     * 发布部门名字
     */
    @TableField("publishing_department_name")
    private String publishingDepartmentName;

    /**
     * 发布人id
     */
    @TableField("publisher_id")
    private Long publisherId;

    /**
     * 发布人名字
     */
    @TableField("publisher_name")
    private String publisherName;

    /**
     * 是否有水印 0是 1否
     */
    @TableField("watermark")
    private Integer watermark;

    /**
     * 是否发送短信 0是 1否
     */
    @TableField("short_message")
    private Integer shortMessage;

    /**
     * 重要标识 0 否 1 是
     */
    @TableField("important_flag")
    private Integer importantFlag;

    /**
     * 提交状态 0保存 1已发布
     */
    @TableField("submit_status")
    private Integer submitStatus;

    /**
     * 学习期限
     */
    @TableField("learn_period")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date learnPeriod;

    /**
     * 审核信息
     */
    @TableField("node_id")
    private Long nodeId;

    /**
     * 节点名称
     */
    @TableField("node_name")
    private String nodeName;

    /**
     * 流程id 外键  tb_global_business id
     */
    @TableField("business_id")
    private Long businessId;

    /**
     * 查阅部门
     */
    @TableField(exist = false)
    private List<Long> departmentIds = Lists.newArrayList();

    /**
     * 查阅人员
     */
    @TableField(exist = false)
    private List<Long[]> userIds = Lists.newArrayList();

}
